﻿<%@ Control Language="C#" EnableViewState="true" AutoEventWireup="true" CodeBehind="adminreport.ascx.cs" Inherits="SvOtchet.controls.adminreport" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v8.1, Version=8.1.6.0, Culture=neutral, PublicKeyToken=9b171c9fd64da1d1"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dxe" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v8.1, Version=8.1.6.0, Culture=neutral, PublicKeyToken=9b171c9fd64da1d1"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dxwgv" %>


<dxe:ASPxComboBox ID="org"   runat="server" DataSourceID="OrgDS" 
    TextField="OrganizationName" ValueField="OrganizationID" 
    ValueType="System.String" 
    >
</dxe:ASPxComboBox>
<p>
    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
        ControlToValidate="org" ErrorMessage="RequiredFieldValidator"></asp:RequiredFieldValidator>
</p>
<dxe:ASPxComboBox ID="year"  runat="server" DataSourceID="YearDS" 
    TextField="year" ValueField="year" ValueType="System.String">
</dxe:ASPxComboBox>
<asp:RequiredFieldValidator  ID="RequiredFieldValidator2" runat="server" 
    ControlToValidate="year" ErrorMessage="RequiredFieldValidator"></asp:RequiredFieldValidator>
<dxe:ASPxComboBox ID="MonthStart"  runat="server" DataSourceID="monthDS" 
    TextField="monthName" ValueField="monthNum" ValueType="System.String">
</dxe:ASPxComboBox>
<p>
    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
        ControlToValidate="MonthStart" ErrorMessage="RequiredFieldValidator"></asp:RequiredFieldValidator>
</p>
<dxe:ASPxComboBox ID="MonthEnd"  runat="server" DataSourceID="monthDS" 
    TextField="monthName" ValueField="monthNum">
</dxe:ASPxComboBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
    ControlToValidate="MonthEnd" ErrorMessage="RequiredFieldValidator"></asp:RequiredFieldValidator>
<p>
    <br /> <dxe:ASPxButton EnableViewState="true" AutoPostBack="true" 
        ID="ASPxButton1" runat="server" Text="ASPxButton" onclick="ASPxButton1_Click">
    </dxe:ASPxButton>
   
</p>


<dxwgv:ASPxGridView ID="ASPxGridView1" runat="server" 
    AutoGenerateColumns="False" DataSourceID="adminreportDS">
    <Columns>
        <dxwgv:GridViewDataTextColumn FieldName="ItemId" VisibleIndex="0">
        </dxwgv:GridViewDataTextColumn>
        <dxwgv:GridViewDataTextColumn FieldName="VisualId" VisibleIndex="1">
        </dxwgv:GridViewDataTextColumn>
        <dxwgv:GridViewDataTextColumn FieldName="Name" VisibleIndex="2">
        </dxwgv:GridViewDataTextColumn>
        <dxwgv:GridViewDataTextColumn FieldName="Measure" VisibleIndex="3">
        </dxwgv:GridViewDataTextColumn>
        <dxwgv:GridViewDataTextColumn FieldName="result" ReadOnly="True" 
            VisibleIndex="4">
        </dxwgv:GridViewDataTextColumn>
    </Columns>
</dxwgv:ASPxGridView>
<asp:ObjectDataSource ID="OrgDS" runat="server" DeleteMethod="Delete" 
    InsertMethod="Insert" OldValuesParameterFormatString="original_{0}" 
    SelectMethod="GetData" 
    TypeName="SvOtchet.DataModel.todb.orgTableAdapters.OrganizationsTableAdapter" 
    UpdateMethod="Update">
    <DeleteParameters>
        <asp:Parameter Name="Original_OrganizationID" Type="Int32" />
    </DeleteParameters>
    <UpdateParameters>
        <asp:Parameter Name="OrganizationName" Type="String" />
        <asp:Parameter Name="Original_OrganizationID" Type="Int32" />
    </UpdateParameters>
    <InsertParameters>
        <asp:Parameter Name="OrganizationName" Type="String" />
    </InsertParameters>
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="YearDS" runat="server" 
    OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" 
    TypeName="SvOtchet.DataModel.sp.GetAllReportYearListTableAdapters.GetAllReportYearListTableAdapter">
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="monthDS" runat="server" DeleteMethod="Delete" 
    InsertMethod="Insert" OldValuesParameterFormatString="original_{0}" 
    SelectMethod="GetData" 
    TypeName="SvOtchet.DataModel.todb.monthTableAdapters.monthTableAdapter" 
    UpdateMethod="Update">
    <DeleteParameters>
        <asp:Parameter Name="Original_id" Type="Int32" />
    </DeleteParameters>
    <UpdateParameters>
        <asp:Parameter Name="monthName" Type="String" />
        <asp:Parameter Name="monthNum" Type="String" />
        <asp:Parameter Name="Original_id" Type="Int32" />
    </UpdateParameters>
    <InsertParameters>
        <asp:Parameter Name="id" Type="Int32" />
        <asp:Parameter Name="monthName" Type="String" />
        <asp:Parameter Name="monthNum" Type="String" />
    </InsertParameters>
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="adminreportDS" runat="server" 
    OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" 
    TypeName="SvOtchet.DataModel.sp.GetReportForAdminTableAdapters.GetReportForAdminTableAdapter">
    <SelectParameters>
        <asp:ControlParameter ControlID="org" DefaultValue="-1" Name="OrgId" 
            PropertyName="Value" Type="Int32" />
        <asp:ControlParameter ControlID="year" DefaultValue="2009" Name="Year" 
            PropertyName="Value" Type="Int32" />
        <asp:ControlParameter ControlID="MonthStart" DefaultValue="2" 
            Name="MonthNumStart" PropertyName="Value" Type="Int32" />
        <asp:ControlParameter ControlID="MonthEnd" DefaultValue="1" Name="MonthNumEnd" 
            PropertyName="Value" Type="Int32" />
    </SelectParameters>
</asp:ObjectDataSource>

